﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Antioch.Base
{
    [Jemgine.Engine.Node, Jemgine.Engine.Category("Antioch System")]
    public class SetCamera : Jemgine.Data.ScriptNode
    {
        public SetCamera()
        {
            AddReference("Camera", typeof(Jemgine.Data.EntityRecord));
            AddInput("Fire", null);
            AddOutput("Relay", null);
        }

        public override void FireTerminal(int InputID, Jemgine.Data.ScriptPayload Payload)
        {
            Sim.CameraModule.Focus = ReferenceTerminals[0].GetTarget(Payload) as Jemgine.Data.EntityRecord;
            OutputTerminals[0].Fire(Payload);
        }
    }

    [Jemgine.Engine.Node, Jemgine.Engine.Category("Antioch System")]
    public class ZoomCamera : Jemgine.Data.ScriptNode
    {
        public float Zoom { get; set; }

        public ZoomCamera()
        {
            AddInput("Fire", null);
            AddOutput("Relay", null);
        }

        public override void FireTerminal(int InputID, Jemgine.Data.ScriptPayload Payload)
        {
            Sim.CameraModule.DestinationZoom = Zoom;
            OutputTerminals[0].Fire(Payload);
        }
    }

    
}
